Electric generators and motors with permanent magnet rotors are often cooled by liquids in thermal contact with the stator. Most of the heat is generated in the iron stator poles, the stator winding and to a lesser extent the rotor magnets. The magnets are in most cases in the centre of the motor inside the stator. The heat is generated mostly in the stator between the magnets and the cooling mantle and the cooling takes place outside the stator. The temperature of the magnets is therefore high.
The temperature of the magnets and windings affects the losses of the motor/generator in two ways. The temperature of the copper in the winding affects the resistance of the copper material as the resistance increases with temperature. Therefore, more heat is generated in a hot winding for a given current. If (which is normally the case) the heat from the winding increases the temperature of the magnets, the magnet flux will decrease, thus creating less torque for a given current. These two effects reinforce each other. A hot magnet will give a lower magnetic field. To maintain the same torque, more current has to be used. This will cause the winding to become hotter, which will increase the winding resistance, causing the windings to become even hotter, etc.